home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4590 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: ix.netcom.com!netnews
  2. From: swampwiz@ix.netcom.com(Jean P. Laborde )
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help!  Program not pausing at 'cin >>'
  5. Date: 31 Jan 1996 05:03:42 GMT
  6. Organization: Netcom
  7. Message-ID: <4emt7e$doj@reader2.ix.netcom.com>
  8. References: <4eld84$bd7@hp5.online.apple.com>
  9. NNTP-Posting-Host: ix-no1-03.ix.netcom.com
  10. X-NETCOM-Date: Tue Jan 30  9:03:42 PM PST 1996
  11.  
  12. In <4eld84$bd7@hp5.online.apple.com> davidrea@eworld.com (DavidRea)
  13. writes: 
  14. >
  15. >Sometimes my programs don't pause to wait for input
  16. >at 'cin >>'.  Also at cin.getline(), etc.  So far I can't
  17. >tell what the difference is between programs that pause
  18. >as expected and programs that don't.
  19. >
  20. >I assume this has something to do with my input buffers having
  21. >stuff in them.  Any advice on: a) What is going on? b) A surefire
  22. >way to make sure my buffers are clear?
  23. >
  24. >Thanks,
  25. >--David Rea
  26.  
  27. Have you tried this line before the cin
  28.  
  29. getch();
  30.  
  31. There probably is an iostream command that does the same thing
  32.  
  33. I might be wrong, but this seems to work for me.
  34.  
  35. Comments Encouraged,
  36. The Swamp Wizard
  37.